package learn.basics.interface1.demo2;

interface MyInterface{
    public default void Method(){
        System.out.println("接口的默认方法");
    }

    public default void MethodInterface(){
        System.out.println("接口中的 Method");
    }
}

class Fu{
    public void Method(){
        System.out.println("父类中的方法");
    }
}

class Zi extends Fu implements MyInterface{

}

class Demo01Interface{
    public static void Test(){
        Zi zi=new Zi();
        zi.Method();
        zi.MethodInterface();
    }
}



public class TestInterface {
    public static void main(String[] args) {
        Demo01Interface.Test();
    }
}
